/**
 * 本文件功能：公共样式表
 * 版权声明：保留发行权和署名权
 * 作者信息：功能反馈:15058593138@qq.com(手机号同微信)
 */

/* 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

a {
    color: #3f51b5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部样式 */
.header {
    background-color: #3f51b5;
    color: white;
    padding: 10px 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 18px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-name {
    margin-right: 10px;
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 导航栏样式 */
.nav {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.nav-inner {
    display: flex;
    overflow-x: auto;
}

.nav-item {
    padding: 10px 15px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item.active {
    color: #3f51b5;
    border-bottom: 2px solid #3f51b5;
    font-weight: bold;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

/* 页面标题栏 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
}

.page-tools {
    display: flex;
    align-items: center;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 6px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
}

.btn-primary {
    color: #fff;
    background-color: #3f51b5;
    border-color: #3949ab;
}

.btn-primary:hover {
    background-color: #303f9f;
    border-color: #283593;
}

.btn-danger {
    color: #fff;
    background-color: #f44336;
    border-color: #e53935;
}

.btn-danger:hover {
    background-color: #e53935;
    border-color: #d32f2f;
}

.btn-success {
    color: #fff;
    background-color: #4caf50;
    border-color: #43a047;
}

.btn-success:hover {
    background-color: #43a047;
    border-color: #388e3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}
.row {
  display: flex;

}
/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

textarea.form-control {
    height: auto;
}

.form-control:focus {
    border-color: #3f51b5;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.form-inline {
    display: flex;
    align-items: center;
}

.form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}

/* 表格样式 */
.table {
    width: 100%;
    background-color: #fff;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* 搜索区域样式 */
.search-area {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 状态标签样式 */
.status-wait {
    display: inline-block;
    padding: 2px 8px;
    color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 3px;
}

.status-progress {
    display: inline-block;
    padding: 2px 8px;
    color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
    border: 1px solid #2196f3;
    border-radius: 3px;
}

.status-done {
    display: inline-block;
    padding: 2px 8px;
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    border-radius: 3px;
}

.status-closed {
    display: inline-block;
    padding: 2px 8px;
    color: #9e9e9e;
    background-color: rgba(158, 158, 158, 0.1);
    border: 1px solid #9e9e9e;
    border-radius: 3px;
}

/* 搜索容器样式 */
.search-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.search-item {
    flex: 1;
    min-width: 80px;
    margin-bottom: 10px;
}

.search-item .form-control {
    width: 100%;
}

.search-item button {
    width: 100%;
}

/* 模态框样式 */
.image-modal {
    background-color: transparent !important;
    pointer-events: none;
}

.image-modal .modal-content {
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 15px;
}


/* 表格信息卡片样式 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.info-table td, .info-table th {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.info-table th {
    width: 120px;
    background-color: #f8f9fa;
    font-weight: 600;
}

@media (max-width: 768px) {
    .search-item {
        flex: 1 0 100%;
    }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.page-item {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    text-align: center;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #3f51b5;
    cursor: pointer;
    border-radius: 3px;
}

.page-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.page-item.disabled {
    color: #ccc;
    background-color: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
}

.page-select {
    margin: 0 10px;
    height: 32px;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;    
    background-color: transparent !important;
    z-index: 1000;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 5px;
    z-index: 1001;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    background: none;
    border: none;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    margin-left: 10px;
}

/* 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    z-index: 2000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
}

.toast-success {
    background-color: #4caf50;
}

.toast-error {
    background-color: #f44336;
}

.toast-warning {
    background-color: #ff9800;
}

/* 图片预览样式 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
}

.image-item {
    width: 100px;
    height: 100px;
    margin-right: 10px;
    margin-bottom: 10px;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-inline {
        flex-wrap: wrap;
    }
    
    .form-inline .form-control {
        margin-bottom: 10px;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
    
    .modal {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header-inner, .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info, .page-tools {
        margin-top: 10px;
    }
}
